package com.ethink.system.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ethink.system.api.info.SystemApiAuthorityInfo;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.system.api.info.SystemRoleApiAuthorityInfo;
import com.ethink.system.api.request.SystemRoleApiAuthorityQueryRequest;
import com.ethink.system.common.entity.SystemRoleApiAuthority;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 系统角色菜单关联表 Mapper接口
 *
 * @author default
 * @date 2022-09-27
 */
@Mapper
public interface SystemRoleApiAuthorityMapper extends BaseMapper<SystemRoleApiAuthority> {

    /**
     * 分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<SystemRoleApiAuthorityInfo> querySystemRoleApiAuthority(Page buildPage, @Param("request") SystemRoleApiAuthorityQueryRequest request);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    SystemRoleApiAuthorityInfo getSystemRoleApiAuthorityById(@Param("id") Long id);

    /**
     * 列表查询
     *
     * @param request
     * @return
     */
    List<SystemRoleApiAuthorityInfo> listSystemRoleApiAuthority(@Param("request") SystemRoleApiAuthorityQueryRequest request);

    /**
     * 查询权限信息根据角色id
     * @param systemRoleId
     * @return
     */
    List<SystemApiAuthorityInfo> selectApiAuthorityListByRoleId(@Param("id")Long systemRoleId);
}